﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Worker
    {
        public string id { get; set; }
        public string name { get; set; }
        public string department { get; set; }

        public Worker()//无参方法==默认构造方法
        {

        }
        public Worker(string id,string name,string department)//参数化构造方法
        {
            this.id = id;
            this.name = name;
            this.department = department;
        }

        public void print()
        {
            Console.WriteLine("员工工号：{0}  员工姓名：{1}  员工部门：{2}",this.id,this.name,this.department);
        }
    }
}
